package com.scpii.api.persistence.ec;

import java.util.List;

import com.scpii.api.domain.ec.Address;

public interface AddressMapper {

	/**
	 * 根据用户ID来获取地址数据
	 * 
	 * @param userId
	 *            用户ID
	 * @return Addrss对象
	 */
	List<Address> getAddressByUserId(Long userId);

	/**
	 * 插入一条Address记录
	 * 
	 * @param record
	 * @return
	 */
	int insert(Address record);

	/**
	 * 根据targetId来更新地址信息
	 * 
	 * @param address
	 * @return
	 */
	int updateAddressById(Address address);

	/**
	 * 删除一条地址信息
	 * 
	 * @param id
	 * @return
	 */
	int deleteAddressById(long id);

	/**
	 * 生成地址ID
	 * 
	 * @return
	 */
	Long generateId();

	/**
	 * @param address
	 * @return
	 */
	List<Address> selectBySelective(Address address);

	/**
	 * @param targetId
	 * @return
	 */
	List<Address> selectByTargetId(Long targetId);

	Address selectByPrimaryKey(Long addressId);

	void insertSelective(Address addressRecord);

	void updateByPrimaryKeySelective(Address persistAddress);

}